package com.blacksea.authserver.util;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * DateUtil
 *
 * @author blacksea3(jxt) 2021/4/12 21:22
 */
public class DateUtil {

    private DateUtil() {

    }

    /**
     * 生成x秒后的日期
     * @param seconds 秒数
     * @return Date结果
     */
    public static Date generateDateAfterSeconds(int seconds) {
        Date date = new Date();
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(date);
        calendar.add(Calendar.SECOND, seconds);
        return calendar.getTime();
    }

}
